<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>问诊卡配置</title>
    <include file="Public:easyui_res"/>
    <style>
        table img {
            cursor: pointer;
        }
    </style>
</head>
<body>
<div id="tb" style="padding:5px;height:auto;">
    <div style="margin: 10px 0 10px 10px">
        <!-- form表单 指定id和name之后会自动带到服务器 -->
        <form name="searchform" method="get" action="" id="searchform" style="height:20px;margin-bottom: 20px">
            <label>统计时间：</label>
            <input class="easyui-datebox" id="beginDt"  name="beginDt"  data-options="required:true" /> 到 <input class="easyui-datebox" id="endDt"  name="endDt"  data-options="required:true" />
            <a href="javascript:void(0);" id="submit_search" class="easyui-linkbutton" iconCls="icon-search" style="width:60px;height:32px">查询</a>
        </form>
    </div>
</div>
<table id="dg" style="width:100%; " title="查询结果"
       data-options="rownumbers:false,
			singleSelect:true,
			pagination:true,
			ctrlSelect:true,
			fitColumns:true,
			loadMsg:'正在加载,请等待....',
			url:'__URL__/getList',
			method:'post',
			toolbar:'#tb',
			">
    <thead>
        <tr>
            <volist name="table_title" id="vo"  >
                <th data-options="field:'{$key}',align:'center',width:'50px'">{$vo}</th>
            </volist>
        </tr>
    </thead>
</table>
<script type="text/javascript">
    //得到当前日期
    formatterDate = function(date) {
        var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
        var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
        + (date.getMonth() + 1);
        return date.getFullYear() + '-' + month + '-' + day;
    };

    window.onload = function () {
        var today = new Date();
        var start=new Date(today.getTime()-31 * 24 * 3600 * 1000);
        $('#beginDt').datebox('setValue', formatterDate(start));
        $('#endDt').datebox('setValue', formatterDate(today));
    }
</script>
</body>
</html>